package com.mallcloud.mall.mall.api.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mallcloud.mall.common.core.constant.enums.mall.MallCommonEnum;
import com.mallcloud.mall.common.core.util.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "MallAdvertisingModel", description = "系统用户")
@Data
@TableName("SYS_ADVERTISING")
public class MallAdvertisingModel implements Serializable {
	private static final long serialVersionUID = 1L;

	@JsonSerialize(using = ToStringSerializer.class)
	@NotNull(message = "id为空", groups = {ValidGroup.Update.class})
	@TableId(value = "code", type = IdType.ASSIGN_ID)
	@ApiModelProperty("广告位编码")
	private Long id;

	@ApiModelProperty("广告位名称")
	@TableField("NAME")
	private String name;

	@ApiModelProperty("广告图片地址")
	@TableField("PATHIMAGE")
	private String pathImage;

	@ApiModelProperty("广告链接地址")
	@TableField("PATHURL")
	private String pathUrl;

	/**
	 * {@link MallCommonEnum.StatusEnum}
	 */
	@ApiModelProperty("状态")
	@TableField("STATUS")
	private String status;

	@ApiModelProperty("广告位置编码")
	@TableField("SATYPE")
	private String advertisingTypeId;

	@ApiModelProperty("活动时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField("NHDSJ")
	private Date activityTime;

	@ApiModelProperty("商场编码")
	@TableField("MALLCODE")
	private String storeNo;

	@ApiModelProperty("录入人")
	@TableField(value = "LRR", fill = FieldFill.INSERT)
	private String createBy;

	@ApiModelProperty("录入日期")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(value = "LRRQ", fill = FieldFill.INSERT)
	private Date createTime;

}
